package com.useeinfo.oa.modules.base.entity;

import com.alibaba.fastjson.JSONObject;
import com.useeinfo.framework.extend.entity.SuperClassEntity;
import com.useeinfo.framework.sugar.tools.StringConverters;
import com.useeinfo.oa.modules.base.enums.AuditTypeEnum;
import com.useeinfo.oa.modules.base.enums.NodeTypeEnum;
import com.useeinfo.oa.modules.security.entity.SystemUser;

import javax.persistence.*;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @Auther: xudong.sun
 * @Date: 2018/12/3 14:34
 * @Description: 审批流节点表
 */
@Entity
@Table(name = "audit_node")
public class AuditNode extends SuperClassEntity<AuditNode> {

    /**
     * 上级节点
     */
    private Long parentId;

    /**
     * 节点名称
     */
    private String nodeName;

    /**
     * 节点类型
     */
    @Enumerated(value = EnumType.STRING)
    @Column(name = "node_type")
    private NodeTypeEnum nodeTypeEnum;

    private String organizationId;//部门Id

    private String relationId;//岗位或者人员Id
    /**
     * 所属审批流
     */
    @ManyToOne
    @JoinColumn(name = "flow_id")
    private AuditFlow auditFlow;


    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getNodeName() {
        return nodeName;
    }

    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    public NodeTypeEnum getNodeTypeEnum() {
        return nodeTypeEnum;
    }

    public void setNodeTypeEnum(NodeTypeEnum nodeTypeEnum) {
        this.nodeTypeEnum = nodeTypeEnum;
    }

    public String getRelationId() {
        return relationId;
    }

    public void setRelationId(String relationId) {
        this.relationId = relationId;
    }

    public String getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }

    public AuditFlow getAuditFlow() {
        return auditFlow;
    }

    public void setAuditFlow(AuditFlow auditFlow) {
        this.auditFlow = auditFlow;
    }
}
